{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## python中经常用到的三种格式化方式：\n",
    "- %(占位符)\n",
    "- format\n",
    "- f-string"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 准备工作：\n",
    "\n",
    "- %c： 格式化字符及其ASCII码\n",
    "- %s： 格式化字符串（常用）\n",
    "- %d： 格式化整数（常用）\n",
    "- %u： 格式化无符号整型（常用）\n",
    "- %o： 格式化无符号八进制数\n",
    "- %x： 格式化无符号十六进制数（常用）\n",
    "- %X： 格式化无符号十六进制数（大写）\n",
    "- %f： 格式化浮点数字，可指定小数点后的精度（常用）\n",
    "- %e： 用科学计数法格式化浮点数（常用）\n",
    "- %E： 作用同%e，用科学计数法格式化浮点数\n",
    "- %g： %f和%e的简写\n",
    "- %G： %F 和 %E 的简写\n",
    "- %p： 用十六进制数格式化变量的地址\n",
    "- %%：格式化百分号标记 \n",
    "- ^：格式化居中对齐（常用）\n",
    "- >：格式化右对齐（常用）\n",
    "- <：格式化左对齐（常用）\n",
    "- +：格式化显示正负号（常用）"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1.%(占位符)\n",
    "\n",
    "声明三个变量：姓名（string）、年龄（int）、身高（float）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.421966Z",
     "start_time": "2021-04-11T11:55:07.419386Z"
    }
   },
   "outputs": [],
   "source": [
    "name = 'Python TestName'\n",
    "age = 99\n",
    "height = 1.85"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.1 混合\n",
    "整数(%d)、浮点数(%f)、字符串(%s)\n",
    "\n",
    "浮点数默认精度为6，即小数点后6位。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.463594Z",
     "start_time": "2021-04-11T11:55:07.460416Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python TestName, 年龄：99, 身高：1.850000m\n",
      "我是：Python TestName, 年龄：99, 身高：1.85m\n"
     ]
    }
   ],
   "source": [
    "print('我是：%s, 年龄：%d, 身高：%fm' % (name,age,height))\n",
    "# 我是：Python , 年龄：99, 身高：1.850000m\n",
    "\n",
    "print('我是：%s, 年龄：%d, 身高：%.2fm' % (name,age,height))\n",
    "# 我是：Python , 年龄：99, 身高：1.85m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.2 进制数\n",
    "输出十六进制、十进制、八进制数（比较常用）：\n",
    "\n",
    "- %x --- hex 十六进制\n",
    "- \n",
    "- %d --- dec 十进制\n",
    "- %o --- oct 八进制"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.506685Z",
     "start_time": "2021-04-11T11:55:07.502378Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "age_hex = 63, age_dec = 99, age_oct = 143\n",
      "0b1100011\n"
     ]
    }
   ],
   "source": [
    "print(\"age_hex = %x, age_dec = %d, age_oct = %o\" %(age,age,age))\n",
    "# age_hex = 63, age_dec = 99, age_oct = 143\n",
    "# 如果需要输出二进制的话，可以使用python函数 bin()：\n",
    "print(bin(age)) # 0b1100011"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.3 宽度、对齐、精度、填充\n",
    "#### 1.3.1 数值型(默认右对齐)\n",
    "格式化输出圆周率（pi = 3.1415926）："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.546817Z",
     "start_time": "2021-04-11T11:55:07.543743Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     3.142\n",
      "3.1415926000\n"
     ]
    }
   ],
   "source": [
    "pi = 3.1415926\n",
    "print('%10.3f' % pi) #       3.142\n",
    "# 宽度为10，右对齐，保留3位小数点\n",
    "\n",
    "print('%-10.10f' % pi) # 3.1415926000\n",
    "# 宽度为10，左对齐，保留小数点后10位(不足10位补0)\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 1.3.2 字符串"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.587698Z",
     "start_time": "2021-04-11T11:55:07.584649Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Python Tes \n",
      "Python\n",
      "    Python\n"
     ]
    }
   ],
   "source": [
    "print( \"%.10s \" % name) \n",
    "# 输出10个字符，如果不足，输出全部\n",
    "\n",
    "print (\"%.*s\" % (6,name)) # Python\n",
    "# 左对齐，取6个字符\n",
    "\n",
    "print (\"%10.6s\" % name) #       Python\n",
    "# 右对齐，宽度为10，取6个字符"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 1.4 正负号\n",
    "\n",
    "带符号输出，即正数（+），负数（-）："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.626378Z",
     "start_time": "2021-04-11T11:55:07.623521Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    +3.142\n",
      "-3.142    \n"
     ]
    }
   ],
   "source": [
    "print('%+10.3f' % pi) # 3.142\n",
    "# 宽度为10，右对齐，保留3位小数点\n",
    "\n",
    "a = -pi\n",
    "print('%+-10.3f' % a) # -3.142\n",
    "# 宽度为10，左对齐，保留3位小数点"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 2. format格式化\n",
    "Python2.6 开始，新增了一种格式化字符串的函数 str.format()，它增强了字符串格式化的功能。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.1 混合\n",
    "#### 2.1.1 不设置位置\n",
    "\n",
    "不设置位置参数时，参数默认从0 开始编号，依次为0,1,2,3......：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.667810Z",
     "start_time": "2021-04-11T11:55:07.665512Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python TestName, 年龄：99, 身高：1.85m\n"
     ]
    }
   ],
   "source": [
    "print('我是：{}, 年龄：{}, 身高：{}m'.format (name,age,height))\n",
    "# 我是：Python , 年龄：99, 身高：1.85m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.1.2 设置位置\n",
    "\n",
    "设置位置参数时，参数根据实际编号对应变量索引，注意{}中编号：\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.707647Z",
     "start_time": "2021-04-11T11:55:07.703930Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python TestName, 年龄：99, 身高：1.85m\n",
      "我是：Python TestName, 年龄：99, 身高：99m\n",
      "我是：Python TestName, 年龄：1.85, 身高：99m\n"
     ]
    }
   ],
   "source": [
    "print('我是：{0}, 年龄：{1}, 身高：{2}m'.format (name,age,height))\n",
    "# 我是：Python , 年龄：99, 身高：1.85m\n",
    "\n",
    "print('我是：{0}, 年龄：{1}, 身高：{1}m'.format (name,age,height))\n",
    "# 我是：Python , 年龄：99, 身高：99m\n",
    "\n",
    "print('我是：{0}, 年龄：{2}, 身高：{1}m'.format (name,age,height))\n",
    "# 我是：Python , 年龄：1.85, 身高：99m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.1.3 单变量参数\n",
    "\n",
    "可以将索引编号设置为关键字，关键字需要有相应赋值："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.744785Z",
     "start_time": "2021-04-11T11:55:07.742193Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python 当打之年, 年龄：99, 身高：1.85m\n"
     ]
    }
   ],
   "source": [
    "print('我是：{name}, 年龄：{age}, 身高：{height}m'.format(name='Python 当打之年', age=99, height=1.85))\n",
    "# 我是：Python , 年龄：99, 身高：1.85m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.1.4 列表参数\n",
    "\n",
    "参数也可以是列表，注意多维列表需要指定为一维列表，'{0[0]}', '{0[1]}', '{0[2]}' 中'0'是必须的："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.783104Z",
     "start_time": "2021-04-11T11:55:07.779791Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python , 年龄：99, 身高：1.85m\n",
      "我是：Python , 年龄：18, 身高：1.85m\n"
     ]
    }
   ],
   "source": [
    "lst = [['Python ', 99, 1.85],['Python ', 18, 1.85]]\n",
    "\n",
    "print('我是：{0[0]}, 年龄：{0[1]}, 身高：{0[2]}m'.format(lst[0])) \n",
    "# 我是：Python , 年龄：99, 身高：1.85m\n",
    "\n",
    "print('我是：{0[0]}, 年龄：{0[1]}, 身高：{0[2]}m'.format(lst[1]))\n",
    "# 我是：Python , 年龄：18, 身高：1.85m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 2.1.5 字典参数\n",
    "\n",
    "当参数为字典时，可以使用关键字："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.820204Z",
     "start_time": "2021-04-11T11:55:07.817351Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python , 年龄：99, 身高：1.85m\n"
     ]
    }
   ],
   "source": [
    "dic = {'name':'Python ','age':99,'height':1.85}\n",
    "\n",
    "print('我是：{name}, 年龄：{age}, 身高：{height}m'.format(**dic))\n",
    "# 我是：Python , 年龄：99, 身高：1.85m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 2.2 宽度、对齐、精度、填充\n",
    "\n",
    "宽度为10，居中、居右、居左对齐："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.855668Z",
     "start_time": "2021-04-11T11:55:07.852523Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "    66    \n",
      "        66\n",
      "66        \n"
     ]
    }
   ],
   "source": [
    "a = 66\n",
    "print('{:^10d}'.format(a)) # 宽度10，居中\n",
    "print('{:>10d}'.format(a)) # 宽度10，居右\n",
    "print('{:<10d}'.format(a)) # 宽度10，居左\n",
    "#     66\n",
    "#         66\n",
    "# 66"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "保留2、3位有效数字，百分比以及指数计数法："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.895443Z",
     "start_time": "2021-04-11T11:55:07.892002Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3.14\n",
      "+3.142\n",
      "314.1593%\n",
      "3.14e+00\n"
     ]
    }
   ],
   "source": [
    "pi = 3.1415926\n",
    "print(\"{:.2f}\".format(pi)) # 不带符号\n",
    "print(\"{:+.3f}\".format(pi)) # 带符号\n",
    "print(\"{:.4%}\".format(pi)) # 百分比\n",
    "print(\"{:.2e}\".format(pi)) # 指数计数法\n",
    "# 3.14\n",
    "# +3.142\n",
    "# 314.1593%\n",
    "# 3.14e+00"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "可以使用不同字符进行填充（补齐）:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.938524Z",
     "start_time": "2021-04-11T11:55:07.934678Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0000660000\n",
      "aaaaaaaa66\n",
      "6600000000\n",
      "0000000Python TestName00000000\n",
      "000000000000000Python TestName\n",
      "Python TestName000000000000000\n",
      "Hello      Python TestName \n"
     ]
    }
   ],
   "source": [
    "print('{:0^10d}'.format(a)) # 宽度10，居中\n",
    "print('{:a>10d}'.format(a)) # 宽度10，居右\n",
    "print('{:0<10d}'.format(a)) # 宽度10，居左\n",
    "# 0000660000\n",
    "# aaaaaaaa66\n",
    "# 6600000000\n",
    "\n",
    "print('{:0^30}'.format(name)) # 宽度30，居中\n",
    "print('{:0>30}'.format(name)) # 宽度30，居右\n",
    "print('{:0<30}'.format(name)) # 宽度30，居左\n",
    "# 000000000Python 0000000000\n",
    "# 0000000000000000000Python \n",
    "# Python 当打之年0000000000000000000\n",
    "\n",
    "print('Hello {0:>{1}} '.format(name,20))\n",
    "# Hello                    Python "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:51:41.537890Z",
     "start_time": "2021-04-11T11:51:41.533398Z"
    }
   },
   "source": [
    "### 2.3 千位分隔符\n",
    "\n",
    "主要用于货币数据格式化输出，用逗号表示，当然也可以用其他字符替代："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:07.978506Z",
     "start_time": "2021-04-11T11:55:07.975046Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "100,000,000\n",
      "1,234,567.1234567\n",
      "-1,234,567.1234567--\n",
      "---1,234,567.1234567\n",
      "1,234,567.1234567---\n"
     ]
    }
   ],
   "source": [
    "print('{:,}'.format(100000000))\n",
    "print('{:,}'.format(1234567.1234567))\n",
    "# 100,000,000\n",
    "# 1,234,567.1234567\n",
    "\n",
    "print('{0:-^20,}'.format(1234567.1234567))\n",
    "print('{0:->20,}'.format(1234567.1234567))\n",
    "print('{0:-<20,}'.format(1234567.1234567))\n",
    "# -1,234,567.1234567--\n",
    "# ---1,234,567.1234567\n",
    "# 1,234,567.1234567---"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 3. f-string格式化\n",
    "\n",
    "f-string格式化是python3.6引入了一种新的字符串格式化方式。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.1 单变量参数\n",
    "\n",
    "变量名直接做参数，比如name, age, height，注意不需要单引号或双引号："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:08.018945Z",
     "start_time": "2021-04-11T11:55:08.016119Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：Python TestName, 年龄：99, 身高：1.85m\n"
     ]
    }
   ],
   "source": [
    "print(f'我是：{name}, 年龄：{age}, 身高：{height}m')\n",
    "# 我是：Python , 年龄：99, 身高：1.85m"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.2 表达式参数\n",
    "\n",
    "可以是直接的数值运算，也可以是变量赋值后运算："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:08.057816Z",
     "start_time": "2021-04-11T11:55:08.054391Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "计算结果是：22\n",
      "计算结果是：909\n"
     ]
    }
   ],
   "source": [
    "print(f'计算结果是：{2*5 + 3*4}')\n",
    "# 计算结果是：22\n",
    "\n",
    "a = 90\n",
    "b = 9\n",
    "print(f'计算结果是：{a*b + a + b}')\n",
    "# 计算结果是：909"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.3 函数参数\n",
    "\n",
    "普通函数作为参数、lambda函数作为参数："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:08.098144Z",
     "start_time": "2021-04-11T11:55:08.094545Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "我是：PYTHON\n",
      "我是：python\n",
      "计算结果是：99\n"
     ]
    }
   ],
   "source": [
    "name = 'PYTHON'\n",
    "print(f'我是：{name}')\n",
    "print(f'我是：{name.lower()}')\n",
    "# 我是：PYTHON\n",
    "# 我是：python\n",
    "\n",
    "a = 90\n",
    "b = 9\n",
    "print(f'计算结果是：{(lambda x,y:x+y)(a,b)}')\n",
    "# 计算结果是：99"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.4 宽度、对齐、精度、填充\n",
    "宽度为10，精度为小数点后2、3、4位，居中、居右、居左对齐，填充方式和format一样可以选择不同的字符："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:08.139577Z",
     "start_time": "2021-04-11T11:55:08.135937Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   3.14   \n",
      "     3.142\n",
      "3.1416    \n",
      "aaa3.14aaa\n",
      "aaaaa3.142\n",
      "3.1416aaaa\n"
     ]
    }
   ],
   "source": [
    "pi = 3.1415926\n",
    "\n",
    "print(f'{pi:^10.2f}')\n",
    "print(f'{pi:>10.3f}')\n",
    "print(f'{pi:<10.4f}')\n",
    "#      3.14 \n",
    "#        3.142\n",
    "# 3.1416 \n",
    "\n",
    "print(f'{pi:a^10.2f}')\n",
    "print(f'{pi:a>10.3f}')\n",
    "print(f'{pi:a<10.4f}')\n",
    "# aaa3.14aaa\n",
    "# aaaaa3.142\n",
    "# 3.1416aaaa"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 3.5 千位分隔符\n",
    "主要用于货币数据格式化输出，用逗号表示，同样也可以用其他字符替代："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-04-11T11:55:08.176484Z",
     "start_time": "2021-04-11T11:55:08.173808Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1,234,567.123457\n",
      "1_234_567.123457\n"
     ]
    }
   ],
   "source": [
    "a = 1234567.1234567\n",
    "print(f'{a:,f}')\n",
    "print(f'{a:_f}')\n",
    "# 1,234,567.123457\n",
    "# 1_234_567.123457"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 总结：\n",
    "\n",
    "### %（占位符）：\n",
    "- 优点：在简单练习中，表达比较直观，易于掌握。\n",
    "- 缺点：随着参数数量的增加，格式输入会逐渐变得繁琐。\n",
    "### format：\n",
    "- 优点：可以根据编号设置单个参数多次输出，填充方式比较灵活。\n",
    "- 缺点：随着参数数量的增加，输入长度会逐渐增加，当有大量参数时，同样比较繁琐。\n",
    "### f-string:\n",
    "- 优点：格式化的方式较前两种更加直观，效率也较前两个高一些。\n",
    "- 缺点：新的格式化方式，有些语句格式较前两中复杂一些。\n",
    "\n",
    "- 上面三种格式化方式都可以使用，在学习过程中，可以根据自己的实际情况选择格式化方式，比较推荐f-string方式。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.6"
  },
  "nbTranslate": {
   "displayLangs": [
    "*"
   ],
   "hotkey": "alt-t",
   "langInMainMenu": true,
   "sourceLang": "en",
   "targetLang": "fr",
   "useGoogleTranslate": true
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
